1 00:00:02,110 --> 00:00:02,580 All right. 2 00:00:02,590 --> 00:00:05,740 We are continuing our journey with robotics instances. 3 00:00:05,740 --> 00:00:09,370 And this video is going to take a look at textures and decals. 4 00:00:09,850 --> 00:00:14,410 Textures and decals are pretty similar, but there are some differences I want to show you here. 5 00:00:14,890 --> 00:00:17,890 So I'm going to add a texture into my part that we've made. 6 00:00:17,890 --> 00:00:20,290 Are additive, the fly part. 7 00:00:21,250 --> 00:00:22,870 And I'll put in a texture in here. 8 00:00:24,390 --> 00:00:26,900 And here it defaults to the front face. 9 00:00:26,910 --> 00:00:29,280 It's showing me that this texture is on the front face. 10 00:00:30,280 --> 00:00:33,220 And in here I can select the texture for my object. 11 00:00:33,220 --> 00:00:38,860 So I've opened up the images section here in the tool box, and I'm just kind of looking at images here. 12 00:00:38,860 --> 00:00:43,420 But here's here's a nice one, so I'll just insert it here by default. 13 00:00:43,420 --> 00:00:44,320 It's a decal. 14 00:00:44,320 --> 00:00:46,090 So I actually put this down here too. 15 00:00:46,090 --> 00:00:47,890 We'll get to learn both at the same time. 16 00:00:48,400 --> 00:00:51,040 And for now, with this decal, I don't want it to be on the front face. 17 00:00:51,040 --> 00:00:56,200 I'll put it on the right side of our part, and I'm just going to copy the texture ID here. 18 00:00:56,680 --> 00:01:00,490 Just copy that bad boy and put it into our texture. 19 00:01:01,300 --> 00:01:02,620 So here's our texture. 20 00:01:02,620 --> 00:01:04,870 You might notice a difference immediately. 21 00:01:05,020 --> 00:01:10,000 So with our decal, it scales along with the size of our part. 22 00:01:10,000 --> 00:01:15,640 So if I were to resize this thing, you'll see that the decal resizes along with it. 23 00:01:15,640 --> 00:01:19,090 And actually let me set the transparency of my part to zero so we can see this better. 24 00:01:19,810 --> 00:01:27,730 You can see it distorts to the size of my part, while my texture, since it applies a repeating image 25 00:01:28,000 --> 00:01:30,700 every time I rescale it, it doesn't scale the picture along with it. 26 00:01:30,700 --> 00:01:35,830 Instead it repeats the texture, which is very useful for having textures in the game that need to be 27 00:01:35,830 --> 00:01:37,780 repeated over and over on a wall. 28 00:01:38,590 --> 00:01:40,060 Whatever the case may be. 29 00:01:40,800 --> 00:01:46,920 So offset studs you is offsetting the texture horizontally in studs. 30 00:01:47,130 --> 00:01:51,870 So if I put one here, you'll notice my whole thing shifted. 31 00:01:51,870 --> 00:01:54,940 It shifted horizontally by one stud. 32 00:01:54,960 --> 00:01:57,180 I will put it back to zero and I'll show you what I mean. 33 00:01:57,180 --> 00:02:04,800 So if I do like 0.1, you'll notice that my texture is slowly being offset. 34 00:02:06,290 --> 00:02:07,670 Over and over. 35 00:02:08,180 --> 00:02:13,190 And then the same thing here offset Studs V, It offsets the texture vertically. 36 00:02:13,190 --> 00:02:22,400 So like if I do point one goes up point two, point three all the way up to one or 100 same general 37 00:02:22,400 --> 00:02:31,580 idea studs per tile you and this is basically the size of the image, the horizontal axis of the image 38 00:02:31,580 --> 00:02:31,970 and stud. 39 00:02:31,970 --> 00:02:32,930 So right now it's at two. 40 00:02:32,960 --> 00:02:37,190 So like from here to here is two studs, but I can increase it to be four. 41 00:02:37,190 --> 00:02:40,670 So now from here to here, the size of my image is four studs. 42 00:02:41,180 --> 00:02:47,210 And then the same thing with studs per tile V, it's the size of the image and it's vertical axis and 43 00:02:47,210 --> 00:02:48,350 studs, so I can set it to four. 44 00:02:48,350 --> 00:02:49,370 So it's all equal. 45 00:02:50,030 --> 00:02:50,890 There we go. 46 00:02:50,900 --> 00:02:52,460 So now there are four studs. 47 00:02:52,470 --> 00:02:53,450 I can make it eight. 48 00:02:54,290 --> 00:02:59,420 And now the image is eight studs by eight studs basically just resizing it. 49 00:02:59,780 --> 00:03:04,910 And of course, as you can tell, it repeats itself while our DX here is scaling with the part. 50 00:03:05,330 --> 00:03:07,550 So let me put them side by side here. 51 00:03:08,390 --> 00:03:11,090 That's the big difference between textures and decals. 52 00:03:11,860 --> 00:03:12,360 All right. 53 00:03:12,370 --> 00:03:13,810 There's our gig, Chad. 54 00:03:14,020 --> 00:03:14,950 What else to talk about? 55 00:03:14,950 --> 00:03:17,140 Here are the Z index. 56 00:03:17,290 --> 00:03:18,970 What the heck is the Z index? 57 00:03:19,300 --> 00:03:22,230 Z index is basically the rendering order. 58 00:03:22,240 --> 00:03:28,390 So if I were to put a bunch of decals on the exact same face, I'd have to change the Z index to apply 59 00:03:28,390 --> 00:03:29,770 a different rendering order. 60 00:03:29,770 --> 00:03:32,800 So let's find a different decal to put on here as well. 61 00:03:33,990 --> 00:03:41,250 Let's put gray, wistful wink on the exact same face that is on our giga chad side. 62 00:03:41,250 --> 00:03:42,990 So I'll put it on our right. 63 00:03:45,530 --> 00:03:48,650 And right now both have a Z index of one. 64 00:03:50,100 --> 00:03:50,390 Okay. 65 00:03:50,400 --> 00:03:52,320 Basically, I had this backwards. 66 00:03:52,320 --> 00:03:52,830 Okay? 67 00:03:52,980 --> 00:03:55,530 The higher number it has, the greater priority. 68 00:03:55,530 --> 00:03:56,690 It has not the other way around. 69 00:03:56,700 --> 00:03:57,720 I don't know what I was thinking. 70 00:03:57,870 --> 00:04:06,840 So because my grey wistful link has a higher priority, a higher Z index than this, it renders on top 71 00:04:06,840 --> 00:04:07,230 of it. 72 00:04:07,230 --> 00:04:13,230 But if my giga image had a higher Z index, like if I put it to four, we don't see our gray wistful 73 00:04:13,230 --> 00:04:15,480 wink anymore because it's rendering behind it. 74 00:04:15,480 --> 00:04:19,230 This has greater rendering priority than our wistful wink. 75 00:04:19,230 --> 00:04:23,550 If I set it at the same level, they're both conjoined in the same way. 76 00:04:23,910 --> 00:04:25,110 Five whatever. 77 00:04:25,110 --> 00:04:30,900 If it has equal to or greater than Z index than this part, then it renders on top. 78 00:04:31,670 --> 00:04:34,720 So yeah, it's basically the difference between textures and decals. 79 00:04:34,730 --> 00:04:35,920 They're very similar. 80 00:04:35,930 --> 00:04:38,960 Textures have their uses, decals have their uses. 81 00:04:38,960 --> 00:04:42,380 And of course you can also change the transparency if you wanted to. 82 00:04:42,410 --> 00:04:46,970 So make one fully transparent, partially transparent, whatever you get the idea. 83 00:04:46,970 --> 00:04:47,810 Very simple.